#include "CreateLayer.h"

#include "NewParameters.h"

#include <QString>
#include <QDataStream>
#include <QTextStream>
#include <iostream>
CreateLayer::CreateLayer(int i,NewParameters params)
{
 
  number=i;
  alpha=params.getSample()[i]["alpha"];
  thickness=params.getSample()[i]["thickness"];
  surface=params.getSample()[i]["surface"];
  k=params.getSample()[i]["k"];
  angleAni=params.getSample()[i]["aniTheta"];
  angleAni2=params.getSample()[i]["aniPhi"];
  frozen=params.getSample()[i]["frozen"];
  m.setX(params.getSample()[i]["mx"]);
  m.setY(params.getSample()[i]["my"]);
  m.setZ(params.getSample()[i]["mz"]);
  nd.setX(params.getSample()[i]["ndx"]);
  nd.setY(params.getSample()[i]["nd"]);
  nd.setZ(params.getSample()[i]["ndz"]);
  nr.setX(params.getSample()[i]["nrx"]);
  nr.setY(params.getSample()[i]["nry"]);
  nr.setZ(params.getSample()[i]["nrz"]);
  ms=params.getSample()[i]["ms"];
  upExchange=params.getSample()[i]["upExchange"];
  downExchange=params.getSample()[i]["downExchange"];
  polarization=params.getSample()[i]["polarization"];
  std::cout<<"layer pol"<<polarization<<std::endl;  
}

CreateLayer::~CreateLayer()
{

}
